home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / mmap.z / mmap
Encoding:
Text File  |  2002-10-03  |  27.7 KB  |  396 lines

  1.  
  2.  
  3.  
  4. mmmmmmmmaaaapppp((((2222))))                                                                mmmmmmmmaaaapppp((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _mmmm_mmmm_aaaa_pppp, _mmmm_mmmm_aaaa_pppp_6666_4444 - map pages of memory
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_mmmm_mmmm_aaaa_nnnn_...._hhhh_>>>>
  14.  
  15.      _vvvv_oooo_iiii_dddd _****_mmmm_mmmm_aaaa_pppp_((((_vvvv_oooo_iiii_dddd _****_aaaa_dddd_dddd_rrrr_,,,, _ssss_iiii_zzzz_eeee______tttt _llll_eeee_nnnn_,,,, _iiii_nnnn_tttt _pppp_rrrr_oooo_tttt_,,,, _iiii_nnnn_tttt _ffff_llll_aaaa_gggg_ssss_,,,, _iiii_nnnn_tttt _ffff_dddd_,,,, _oooo_ffff_ffff______tttt
  16.           _oooo_ffff_ffff_))))_;;;;
  17.  
  18.      _vvvv_oooo_iiii_dddd _****_mmmm_mmmm_aaaa_pppp_6666_4444_((((_vvvv_oooo_iiii_dddd _****_aaaa_dddd_dddd_rrrr_,,,, _ssss_iiii_zzzz_eeee______tttt _llll_eeee_nnnn_,,,, _iiii_nnnn_tttt _pppp_rrrr_oooo_tttt_,,,, _iiii_nnnn_tttt _ffff_llll_aaaa_gggg_ssss_,,,, _iiii_nnnn_tttt _ffff_dddd_,,,, _oooo_ffff_ffff_6666_4444______tttt
  19.           _oooo_ffff_ffff_))))_;;;;
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      The functions _mmmm_mmmm_aaaa_pppp and _mmmm_mmmm_aaaa_pppp_6666_4444 establish a mapping between a process's
  23.      address space and a virtual memory object.  The format of the call is as
  24.      follows:
  25.  
  26.           _p_a = _mmmm_mmmm_aaaa_pppp_((((_a_d_d_r_,,,, _l_e_n_,,,, _p_r_o_t_,,,, _f_l_a_g_s_,,,, _f_d_,,,, _o_f_f_))))_;;;;
  27.  
  28.      _mmmm_mmmm_aaaa_pppp establishes a mapping between the process's address space at an
  29.      address _p_a for _l_e_n bytes to the memory object represented by the file
  30.      descriptor _f_d at offset _o_f_f for _l_e_n bytes.  The value of _p_a is an
  31.      implementation-dependent function of the parameter _a_d_d_r and values of
  32.      _f_l_a_g_s, further described below.  A successful _mmmm_mmmm_aaaa_pppp call returns _p_a as its
  33.      result.  The address ranges covered by [_p_a, _p_a + _l_e_n) and [_o_f_f, _o_f_f +
  34.      _l_e_n) must be legitimate for the possible (not necessarily current)
  35.      address space of a process and the object in question, respectively.
  36.  
  37.      The only difference between _mmmm_mmmm_aaaa_pppp and _mmmm_mmmm_aaaa_pppp_6666_4444 is that in _mmmm_mmmm_aaaa_pppp_6666_4444 the _o_f_f
  38.      parameter is 64 bits long, so the file offset can be greater than 2
  39.      gigabytes.  This is useful for certain filesystem types that support such
  40.      file offsets.
  41.  
  42.      The mapping established by _mmmm_mmmm_aaaa_pppp replaces any previous mappings for the
  43.      process's pages in the range [_p_a, _p_a + _l_e_n).
  44.  
  45.      The parameter _p_r_o_t determines whether read (load), write (store),
  46.      execute, or some combination of accesses are permitted to the pages being
  47.      mapped.  The protection options are defined in _<<<<_ssss_yyyy_ssss_////_mmmm_mmmm_aaaa_nnnn_...._hhhh_>>>> as:
  48.           _PPPP_RRRR_OOOO_TTTT______RRRR_EEEE_AAAA_DDDD                Page can be read.
  49.           _PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE               Page can be written.
  50.           _PPPP_RRRR_OOOO_TTTT______EEEE_XXXX_EEEE_CCCC                Page can be executed.
  51.           _PPPP_RRRR_OOOO_TTTT______NNNN_OOOO_NNNN_EEEE                Page can not be accessed.
  52.  
  53.      Not all implementations literally provide all possible combinations.
  54.      _PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE is often implemented as _PPPP_RRRR_OOOO_TTTT______RRRR_EEEE_AAAA_DDDD_||||_PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE and _PPPP_RRRR_OOOO_TTTT______EEEE_XXXX_EEEE_CCCC as
  55.      _PPPP_RRRR_OOOO_TTTT______RRRR_EEEE_AAAA_DDDD_||||_PPPP_RRRR_OOOO_TTTT______EEEE_XXXX_EEEE_CCCC.  This is true for all SGI implementations.  In
  56.      particular, MIPS processors do not support a separate execute permission.
  57.      Any page that can be read can be executed from, even if _PPPP_RRRR_OOOO_TTTT______EEEE_XXXX_EEEE_CCCC is not
  58.      specified.  Instead, the operating system uses _PPPP_RRRR_OOOO_TTTT______EEEE_XXXX_EEEE_CCCC as a flag to
  59.      indicate it may need to perform certain platform dependent functions
  60.  
  61.  
  62.                                                                         PPPPaaaaggggeeee 1111
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69. mmmmmmmmaaaapppp((((2222))))                                                                mmmmmmmmaaaapppp((((2222))))
  70.  
  71.  
  72.  
  73.      (such as cache flushing) that may be needed to properly execute
  74.      instructions from the associated page.  See _mmmm_pppp_rrrr_oooo_tttt_eeee_cccc_tttt(2) for further
  75.      details.  However, no implementation will permit a store to succeed where
  76.      _PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE has not been set.  The behavior of _PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE can be
  77.      influenced by setting _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE in the _f_l_a_g_s parameter, described
  78.      below.
  79.  
  80.      The parameter _f_l_a_g_s provides other information about the handling of the
  81.      mapped pages.  The options are defined in _<<<<_ssss_yyyy_ssss_////_mmmm_mmmm_aaaa_nnnn_...._hhhh_>>>> as:
  82.  
  83.           _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD               Share changes
  84.           _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE              Changes are private
  85.           _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD                Interpret addr exactly
  86.           _MMMM_AAAA_PPPP______AAAA_UUUU_TTTT_OOOO_GGGG_RRRR_OOOO_WWWW             Implicitly grow object
  87.           _MMMM_AAAA_PPPP______LLLL_OOOO_CCCC_AAAA_LLLL                Do not share with share group
  88.           _MMMM_AAAA_PPPP______AAAA_UUUU_TTTT_OOOO_RRRR_EEEE_SSSS_RRRR_VVVV            Reserve logical swap on demand
  89.           _MMMM_AAAA_PPPP______SSSS_GGGG_IIII______AAAA_NNNN_YYYY_AAAA_DDDD_DDDD_RRRR          Use reserved area for mappings
  90.  
  91.      _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD and _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE describe the disposition of store references
  92.      to the memory object.  If _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD is specified, store references will
  93.      change the memory object.  If _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE is specified, the initial store
  94.      reference will create a private copy of the memory object page and
  95.      redirect the mapping to the copy.  Either _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD or _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE must
  96.      be specified, but not both.  The mapping type is retained across a
  97.      _ffff_oooo_rrrr_kkkk(2).
  98.  
  99.      When _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD is specified, and initially in all pages when _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE
  100.      is specified, the contents of the mapped segment change to reflect
  101.      changes in the underlying memory object. Changes can be caused by other
  102.      processes that map the same object with _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD, or by processes using
  103.      write(2) or ftruncate(2). If the file is shortened, an attempt to access
  104.      a page of memory that is mapped to a part of the file that no longer
  105.      exists will cause a Bus Error (SIGBUS) signal.
  106.  
  107.      When _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE is used, a private copy of a page is created only when
  108.      the process stores into the page. This prevents changes from being seen
  109.      by other processes that map the same object, and prevents further changes
  110.      made by other processes from being visible. However, changes that occur
  111.      before the page is stored into are visible.
  112.  
  113.      To protect the contents of a mapped file from changes or truncation you
  114.      can either use chmod(2) and lockf(3) to enforce a mandatory file lock, or
  115.      you can specify _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE and store into every page of the segment in
  116.      order to create a complete private copy of the data.
  117.  
  118.      _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD informs the system that the value of _p_a must be _a_d_d_r, exactly.
  119.      When _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD is not set, the system uses _a_d_d_r in an implementation-
  120.      specific manner to arrive at _p_a.  The _p_a so chosen will be an area of the
  121.      address space which the system deems suitable for a mapping of _l_e_n bytes
  122.      to the specified object.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                                                         PPPPaaaaggggeeee 2222
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. mmmmmmmmaaaapppp((((2222))))                                                                mmmmmmmmaaaapppp((((2222))))
  136.  
  137.  
  138.  
  139.      All implementations interpret an _a_d_d_r value of zero as granting the
  140.      system complete freedom in selecting _p_a, subject to constraints described
  141.      below.  A non-zero value of _a_d_d_r is taken to be a suggestion of a process
  142.      address near which the mapping should be placed.  When the system selects
  143.      a value for _p_a, it will never place a mapping at address _0000, nor will it
  144.      replace any extant mapping, and it will attempt to map away from areas
  145.      considered part of the potential data or stack segments.
  146.  
  147.      The _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD directive should be used with caution.  When _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD is
  148.      set, any mappings (including text, heap, data, and stack) in the range
  149.      [_a_d_d_r, _a_d_d_r + _l_e_n) will be replaced with the new mapping.
  150.  
  151.      To ensure best system hardware cache behavior, objects should be mapped
  152.      such that the low sixteen bits of the file offset of the object match the
  153.      low bits of the mapped address.
  154.  
  155.      The address range from 0x30000000 to 0x40000000 is normally reserved for
  156.      _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD mappings except when _MMMM_AAAA_PPPP______SSSS_GGGG_IIII______AAAA_NNNN_YYYY_AAAA_DDDD_DDDD_RRRR is specified or when the
  157.      _SSSS_GGGG_IIII______UUUU_NNNN_SSSS_UUUU_PPPP_PPPP_OOOO_RRRR_TTTT_EEEE_DDDD______MMMM_AAAA_PPPP______RRRR_EEEE_SSSS_EEEE_RRRR_VVVV_EEEE_DDDD______RRRR_AAAA_NNNN_GGGG_EEEE option is enabled with _ssss_yyyy_ssss_ssss_gggg_iiii(2).
  158.      Note that this space may not be useful for programs which require a very
  159.      large heap, since by default program heaps start near 0x10000000 and grow
  160.      toward higher addresses.  This range will never be used when zero is
  161.      passed as the value for _a_d_d_r unless either _MMMM_AAAA_PPPP______SSSS_GGGG_IIII______AAAA_NNNN_YYYY_AAAA_DDDD_DDDD_RRRR or
  162.      _SSSS_GGGG_IIII______UUUU_NNNN_SSSS_UUUU_PPPP_PPPP_OOOO_RRRR_TTTT_EEEE_DDDD______MMMM_AAAA_PPPP______RRRR_EEEE_SSSS_EEEE_RRRR_VVVV_EEEE_DDDD______RRRR_AAAA_NNNN_GGGG_EEEE is used.  See _ssss_gggg_iiii______uuuu_ssss_eeee______aaaa_nnnn_yyyy_aaaa_dddd_dddd_rrrr(1) for
  163.      further details.
  164.  
  165.      If _MMMM_AAAA_PPPP______AAAA_UUUU_TTTT_OOOO_GGGG_RRRR_OOOO_WWWW is specified with _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD, the mapped object will be
  166.      implicitly grown when referenced by a store operation to a page which
  167.      maps beyond the current end of the object; the object will be grown and
  168.      zero-filled to fulfill the mapping up to the next page boundary or to the
  169.      end of the mapping, whichever is less.  If used with _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE,
  170.      _MMMM_AAAA_PPPP______AAAA_UUUU_TTTT_OOOO_GGGG_RRRR_OOOO_WWWW allocates private zero-filled pages for references beyond
  171.      the end of the object, but does not grow the object.
  172.  
  173.      _MMMM_AAAA_PPPP______AAAA_UUUU_TTTT_OOOO_GGGG_RRRR_OOOO_WWWW requires that the object is mapped with _PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE
  174.      permission.  Load references to mapped pages following the end of a
  175.      object will result in the delivery of a _SSSS_IIII_GGGG_SSSS_EEEE_GGGG_VVVV signal, as will various
  176.      filesystem conditions on stores.  Whenever a _SSSS_IIII_GGGG_SSSS_EEEE_GGGG_VVVV signal is delivered,
  177.      the second argument to the signal handler contains a value that indicates
  178.      the reason for the delivery of the signal; these values are defined in
  179.      /_u_s_r/_i_n_c_l_u_d_e/_s_y_s/_e_r_r_n_o._h.
  180.  
  181.      When _MMMM_AAAA_PPPP______AAAA_UUUU_TTTT_OOOO_GGGG_RRRR_OOOO_WWWW is specified, _l_e_n determines the maximum size of the
  182.      memory map, as opposed to the initial size.  The size of the map is
  183.      extended automatically by storing to any location beyond the current
  184.      working size, up to the size limited by _l_e_n. The mapped file will also be
  185.      extended, even if it is closed. Any read or write beyond the end of the
  186.      _l_e_n specified area results in delivery of a _SSSS_IIII_GGGG_SSSS_EEEE_GGGG_VVVV signal.  Therefore
  187.      the use of _MMMM_AAAA_PPPP______AAAA_UUUU_TTTT_OOOO_GGGG_RRRR_OOOO_WWWW must anticipate the maximum _l_e_n as to prevent
  188.      failed accesses beyond the end of the mmapped area.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                                                         PPPPaaaaggggeeee 3333
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. mmmmmmmmaaaapppp((((2222))))                                                                mmmmmmmmaaaapppp((((2222))))
  202.  
  203.  
  204.  
  205.      If _MMMM_AAAA_PPPP______LLLL_OOOO_CCCC_AAAA_LLLL is used and the process does an _s_p_r_o_c(2) each process will
  206.      receive a private copy of the object's mapping.  All subsequent load
  207.      reference of objects mapped _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE will cause private copies of the
  208.      object to be created.  In addition, the share group processes will be
  209.      able to independently unmap the object from their address spaces.
  210.  
  211.      The system reserves _l_e_n bytes of logical swap space when _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE
  212.      mappings of regular files are created, as well as for all mappings of
  213.      /dev/zero.  (See _ssss_wwww_aaaa_pppp_((((_1111_mmmm_)))) for a discussion of logical swap space.)  If
  214.      insufficient logical swap space is available, _mmmm_mmmm_aaaa_pppp fails with _EEEE_AAAA_GGGG_AAAA_IIII_NNNN.
  215.      The _MMMM_AAAA_PPPP______AAAA_UUUU_TTTT_OOOO_RRRR_EEEE_SSSS_RRRR_VVVV flag causes logical swap space to be automatically
  216.      reserved as each page is first referenced with a store operation instead
  217.      of when the mapping is created.  When this flag is used, no logical swap
  218.      space is reserved when the mapping is created.  Therefore, the system
  219.      cannot guarantee that space will be available when needed.  If all the
  220.      logical swap space has been taken by other processes when a page in a
  221.      _MMMM_AAAA_PPPP______AAAA_UUUU_TTTT_OOOO_RRRR_EEEE_SSSS_RRRR_VVVV mapping is first stored to, then the process will be sent
  222.      _SSSS_IIII_GGGG_BBBB_UUUU_SSSS.
  223.  
  224.      The parameter _o_f_f is constrained to be aligned and sized according to the
  225.      value returned by _gggg_eeee_tttt_pppp_aaaa_gggg_eeee_ssss_iiii_zzzz_eeee_((((_2222_)))) or _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(_SC_PAGESIZE).  When
  226.      _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD is specified, the parameter _a_d_d_r as well as _o_f_f must be aligned
  227.      according to the value returned by _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(_SC_MMAP_FIXED_ALIGNMENT).
  228.      The system performs mapping operations over whole pages.  Thus, while the
  229.      parameter _l_e_n need not meet a size or alignment constraint, the system
  230.      will include, in any mapping operation, any partial page specified by the
  231.      range [_p_a, _p_a + _l_e_n).
  232.  
  233.      The system will always zero-fill any partial page at the end of an
  234.      object.  Further, the system will never write out any modified portions
  235.      of the last page of an object which are beyond its end.  References to
  236.      whole pages following the end of an object will result in the delivery of
  237.      a _SSSS_IIII_GGGG_BBBB_UUUU_SSSS signal.  _SSSS_IIII_GGGG_BBBB_UUUU_SSSS signals may also be delivered on various
  238.      filesystem conditions, including quota exceeded errors, and for physical
  239.      device errors (such as unreadable disk blocks).  The signal handler may
  240.      examine the _ssss_iiii______cccc_oooo_dddd_eeee and _ssss_iiii______eeee_rrrr_rrrr_nnnn_oooo fields of the _ssss_iiii_gggg_iiii_nnnn_ffff_oooo structure for
  241.      information about the nature of the error.
  242.  
  243. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  244.      On success, _mmmm_mmmm_aaaa_pppp returns the address at which the mapping was placed
  245.      (_p_a).  On failure it returns _MMMM_AAAA_PPPP______FFFF_AAAA_IIII_LLLL_EEEE_DDDD and sets _eeee_rrrr_rrrr_nnnn_oooo to indicate an
  246.      error.
  247.  
  248. EEEERRRRRRRROOOORRRRSSSS
  249.      Under the following conditions, _mmmm_mmmm_aaaa_pppp fails and sets _eeee_rrrr_rrrr_nnnn_oooo to:
  250.  
  251.      _EEEE_AAAA_GGGG_AAAA_IIII_NNNN The mapping could not be locked in memory.
  252.  
  253.      _EEEE_AAAA_GGGG_AAAA_IIII_NNNN The amount of logical swap space required is temporarily
  254.             unavailable.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                                                         PPPPaaaaggggeeee 4444
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267. mmmmmmmmaaaapppp((((2222))))                                                                mmmmmmmmaaaapppp((((2222))))
  268.  
  269.  
  270.  
  271.      _EEEE_BBBB_AAAA_DDDD_FFFF  _f_d is not open.
  272.  
  273.      _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS _f_d is not open for read, regardless of the protection specified,
  274.             or _f_d is not open for write and _PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE was specified for a
  275.             _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD type mapping.
  276.  
  277.      _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS _p_r_o_t has extraneous bits set.
  278.  
  279.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL The arguments _a_d_d_r (if _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD was specified) or _o_f_f are not
  280.             multiples of the value returned by
  281.             _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(_SC_MMAP_FIXED_ALIGNMENT).
  282.  
  283.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL The arguments _f_l_a_g_s is invalid (neither _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE or
  284.             _MMMM_AAAA_PPPP______SSSS_HHHH_AAAA_RRRR_EEEE_DDDD).
  285.  
  286.      _EEEE_IIII_NNNN_VVVV_AAAA_LLLL The argument _a_d_d_r specifies an unmappable address.
  287.  
  288.      _EEEE_NNNN_XXXX_IIII_OOOO  Addresses in the range [_o_f_f, _o_f_f + _l_e_n) are invalid for _f_d.
  289.  
  290.      _EEEE_NNNN_XXXX_IIII_OOOO  The argument _l_e_n has a value less than or equal to _0000.
  291.  
  292.      _EEEE_NNNN_OOOO_DDDD_EEEE_VVVV _f_d refers to an object for which _mmmm_mmmm_aaaa_pppp is meaningless, such as a
  293.             terminal.
  294.  
  295.      _EEEE_NNNN_OOOO_SSSS_YYYY_SSSS _f_d refers to an object for which _mmmm_mmmm_aaaa_pppp is not permitted.
  296.  
  297.      _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM zero was passed as the value of _a_d_d_r, and insufficient space was
  298.             available in the standard address ranges.  This is primarily an
  299.             issue for 32 bit programs requesting 1GByte or more, because the
  300.             range from 0x30000000 to 0x40000000 is reserved for _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD as
  301.             described above.
  302.  
  303.      _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD was specified and the range [_a_d_d_r, _a_d_d_r + _l_e_n) is
  304.             invalid or exceeds that allowed for the address space of a
  305.             process, or _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD was not specified and there is insufficient
  306.             room in the address space to effect the mapping.
  307.  
  308.      _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM The calling process has the automatic memory locking of future
  309.             mappings enabled [see _mmmm_llll_oooo_cccc_kkkk_aaaa_llll_llll(3C)] and there is insufficient
  310.             physical memory available for the mapping.
  311.  
  312. NNNNOOOOTTTTEEEESSSS
  313.      _mmmm_mmmm_aaaa_pppp allows access to resources via address space manipulations instead
  314.      of the _rrrr_eeee_aaaa_dddd/_wwww_rrrr_iiii_tttt_eeee interface.  Once a file is mapped, all a process has to
  315.      do to access it is use the data at the address to which the object was
  316.      mapped.  Consider the following pseudo-code:
  317.  
  318.           _ffff_dddd _==== _oooo_pppp_eeee_nnnn_((((_...._...._...._))))
  319.           _llll_ssss_eeee_eeee_kkkk_((((_ffff_dddd_,,,, _oooo_ffff_ffff_ssss_eeee_tttt_))))
  320.           _rrrr_eeee_aaaa_dddd_((((_ffff_dddd_,,,, _bbbb_uuuu_ffff_,,,, _llll_eeee_nnnn_))))
  321.           _////_**** _uuuu_ssss_eeee _dddd_aaaa_tttt_aaaa _iiii_nnnn _bbbb_uuuu_ffff _****_////
  322.  
  323.  
  324.  
  325.  
  326.                                                                         PPPPaaaaggggeeee 5555
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333. mmmmmmmmaaaapppp((((2222))))                                                                mmmmmmmmaaaapppp((((2222))))
  334.  
  335.  
  336.  
  337.      Here is a rewrite using _mmmm_mmmm_aaaa_pppp:
  338.  
  339.           _ffff_dddd _==== _oooo_pppp_eeee_nnnn_((((_...._...._...._))))
  340.           _aaaa_dddd_dddd_rrrr_eeee_ssss_ssss _==== _mmmm_mmmm_aaaa_pppp_((((_NNNN_UUUU_LLLL_LLLL_,,,, _llll_eeee_nnnn_,,,, _((((_PPPP_RRRR_OOOO_TTTT______RRRR_EEEE_AAAA_DDDD _|||| _PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE_))))_,,,,
  341.                          _MMMM_AAAA_PPPP______PPPP_RRRR_IIII_VVVV_AAAA_TTTT_EEEE_,,,, _ffff_dddd_,,,, _oooo_ffff_ffff_ssss_eeee_tttt_))))
  342.           _////_**** _uuuu_ssss_eeee _dddd_aaaa_tttt_aaaa _aaaa_tttt _aaaa_dddd_dddd_rrrr_eeee_ssss_ssss _****_////
  343.  
  344.      Previous IRIX releases have only required _MMMM_AAAA_PPPP______FFFF_IIII_XXXX_EEEE_DDDD address alignment to
  345.      the system page size returned with _gggg_eeee_tttt_pppp_aaaa_gggg_eeee_ssss_iiii_zzzz_eeee(2).  This is no longer
  346.      true for the MIPS R4000PC, R4600 and R5000 processors.  Requests now must
  347.      be aligned to the size returned by _ssss_yyyy_ssss_cccc_oooo_nnnn_ffff(_SC_MMAP_FIXED_ALIGNMENT).
  348.  
  349. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  350.      sgi_use_anyaddr(1), fcntl(2), fork(2), madvise(2), mprotect(2), msync(2),
  351.      munmap(2), plock(2), sproc(2), sysconf(2), lockf(3C).
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.                                                                         PPPPaaaaggggeeee 6666
  393.  
  394.  
  395.  
  396.